using System;
using System.Collections.Generic;
using System.Text;

namespace Penult.BNet.Halo3.PlayedGames
{
    public class Player : Entity
    {
        #region Class Variables
        private string _callsign;
        private int _exp;
        private GradeTitle _grade;
        private int _highestSkill;
        private int _lifetimeExp;
        private int _playlistSkill;
        private RankTitle _rank;
        private Team _team;
        #endregion

        public string Callsign 
        {
            get { return _callsign; }
            set { _callsign = value; }
        }
        public int Exp 
        {
            get { return _exp; }
            set { _exp = value; }
        }
        public GradeTitle Grade 
        {
            get { return _grade; }
            set { _grade = value; }
        }
        public int HighestSkill 
        {
            get { return _highestSkill; }
            set { _highestSkill = value; }
        }
        public int LifetimeExp 
        {
            get { return _lifetimeExp; }
            set { _lifetimeExp = value; }
        }
        public override PlaceOrder Place 
        {
            get 
            {
                if (Team != null)
                {
                    return (Team.Place);
                }
                else
                {
                    return (base.Place);
                }
            }
            set
            {
                if (Team != null)
                {
                    Team.Place = value;
                }
                else
                {
                    base.Place = value;
                }
            }
        }
        public int PlaylistSkill 
        {
            get { return _playlistSkill; }
            set { _playlistSkill = value; }
        }
        public RankTitle Rank 
        {
            get { return _rank; }
            set { _rank = value; }
        }
        public Team Team 
        {
            get { return _team; }
            set { _team = value; }
        }

        public Player() : base() 
        {
            Callsign = string.Empty;
            Exp = 0;
            Grade = GradeTitle.Grade_1;
            HighestSkill = 0;
            LifetimeExp = 0;
            PlaylistSkill = 0;
            Rank = RankTitle.None;
            Team = null;
        }
    }
}
